package cn.jsony.user.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import cn.jsony.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 实体类：
 */
public class User extends BaseDomain{

    private String username;
    private String phone;
    private String email;
    /**
     * 盐值
     */
    private String salt;
    /**
     * 密码，md5加密加盐
     */
    private String password;
    /**
     * 员工状态 - 1启用，0禁用
     */
    private Integer state;
    private Integer age;
    @DateTimeFormat(pattern = "yyyy-MM-dd ")
    @JsonFormat(pattern ="yyyy-MM-dd",timezone ="GMT+8")
    private Date createtime =new Date();
    private String headImg;
    private Long logininfo_id;

    public User(){}

    public User(String username, String phone, String email, String salt, String password, Integer state, Integer age, Date createtime, String headImg, Long logininfo_id) {
        this.username = username;
        this.phone = phone;
        this.email = email;
        this.salt = salt;
        this.password = password;
        this.state = state;
        this.age = age;
        this.createtime = createtime;
        this.headImg = headImg;
        this.logininfo_id = logininfo_id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public Long getLogininfo_id() {
        return logininfo_id;
    }

    public void setLogininfo_id(Long logininfo_id) {
        this.logininfo_id = logininfo_id;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", salt='" + salt + '\'' +
                ", password='" + password + '\'' +
                ", state=" + state +
                ", age=" + age +
                ", createtime=" + createtime +
                ", headImg='" + headImg + '\'' +
                ", logininfo_id=" + logininfo_id +
                '}';
    }
}
